class Person {

    //实例属性
    //只读属性
    readonly name: string
    age: number
    //静态属性
    static ID: string = "ICP01928"

    //构造器
    constructor(name: string, age: number) {
        this.name = name
        this.age = age
    }
}

let person = new Person("孙悟空", 10)
console.log(person)
// 只读属性
// person.name = 'Tom'
console.log(Person.ID)

